<!DOCTYPE html>
<html lang="en">
<head>
<meta name="layout" content="main_pc">
<title>火堆工作台</title>
<link rel="stylesheet"
	href="${resource(dir: 'css', file: 'user.center.css')}" type="text/css">
<script type="text/javascript"
	src="${resource(dir: 'js', file: 'jquery-1.10.2.js')}"></script>
<script type="text/javascript"
	src="${resource(dir: 'js', file: 'ajaxfileupload.js')}"></script>
<script
	src="${resource(dir: 'js', file: 'bootstrap-datepicker.min.js')}"
	charset="UTF-8"></script>
<link rel="stylesheet"
	href="${resource(dir: 'css_pc', file: 'bootstrap-datepicker.css')}"
	type="text/css">
<style>
.fix-width {
	width: 280px;
	height: 40px;
	float: left;
	margin-left: 20px;
}

.btn-container-div {
	width: 580px;
	height: 40px;
	margin-left: 200px;
	display: block;
}

.btn-container {
	float: left;
	width: 80px;
	height: 48px;
}

.data-list-box {
	margin-top: 100px;
}

.link-download-all {
	padding: 6px 12px;
	margin-bottom: 0;
	font-size: 14px;
	font-weight: normal;
	line-height: 1.428571429;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 4px;
	-webkit-user-select: none;
}
</style>
</head>
<body>

	<div class="container-fluid">

		<section class="quick-navi mb20">
			<div class="container">
				<a href="#" class="quick-link"><span>火堆工作台</span><span
					class="caret"></span></a>
				<!--a href="#" class="quick-link">联系我们</a-->
			</div>
		</section>

		<section>
			<div class="container mb50">

				<g:render template="navigate" model="[status: status]" />

				<div class="right-content" id="rightconsole">
					<div
						style="line-height: 25px; font-size: 15pt; padding: 10px 0px 10px 0px">
						项目筹款明细</div>

					<g:form id="all-form"
						url="[action:'listProjectFeeDetail',controller:'manage']"
						method="post">

						<div class="form-item fix-width">
							<label for="">项目ID:<span class="tips"></span></label>
							<div class="form-ctrl">
								<input type="text" class="projectID" id="projectID"
									name="projectID" value="${projectID}">
							</div>
						</div>

						<div class="form-item fix-width">
							<label for="">发起人ID:<span class="tips"></span></label>
							<div class="form-ctrl">
								<input type="text" class="userID" id="userID" name="userID"
									value="${userID}">
							</div>
						</div>

						<div class="form-item fix-width">
							<label for="">项目名称:<span class="tips"></span></label>
							<div class="form-ctrl">
								<input type="text" class="projectName" id="projectName"
									name="projectName" value="${projectName}">
							</div>
						</div>


						<div class="form-item fix-width">
							<label for="">项目状态:<span class="tips"></span></label>
							<div class="form-ctrl">
								<select id="verified" name="verified"
									style="width: 215px; height: 40px; border: 1px solid;">
									<option value=""></option>
									<option value="draft">草稿</option>
									<option value="wait">审核中</option>
									<option value="refuse">不通过</option>
									<option value="modify">退回修改</option>
									<option value="pass">筹款中</option>
									<option value="execute">执行中</option>
									<option value="expired">已过期</option>
									<option value="over">已结束</option>
								</select>
							</div>
						</div>
						<div class="btn-container-div">
							<div class="btn-container">
								<Button class="btn btn-save-all" style="margin: 40px 0px">搜索</Button>
							</div>
						</div>
					</g:form>



					<div class="btn-container" >
						<g:link controller="manage" action="downProjectFeeDetailReport"
							params='[projectID:"${projectID}",userID:"${userID }",verified:"${verified }",projectName:"${projectName }",exportType:"excel",extension:"xls"]'
							target='_blank'>
							<Button class="btn btn-download-all" data-dialog="dialog1"
							style="margin: 40px 0px">导出为excel表</Button>
						</g:link>
					</div>

					<div class="data-list-box">
						<ul class="cdsp-table">
							<li class="t-head">
								<div class="col-2">项目ID</div>
								<div class="col-2">发起人ID</div>
								<div class="col-2">项目名称</div>
								<div class="col-1">天数</div>
								<div class="col-2">项目状态</div>
								<div class="col-1">人次</div>
								<div class="col-2">目标金额</div>
								<div class="col-2">已筹金额</div>
								<div class="col-2">支付金额</div>
								<div class="col-2">配捐爱心池</div>
								<div class="col-2">配捐金额</div>
								<div class="clearboth"></div>
							</li>
	
							<g:each in="${projects}" var="${project}" status="i">
								<li>
									<div class="col-2">
										<div class="title">
											${project.id}
										</div>
									</div>
									<div class="col-2">
										<div class="title">
											${project.member}
										</div>
									</div>
									<div class="col-2">
										<div class="title">
											${project.name}
										</div>
									</div>
									<div class="col-1">
										<div class="text">
											${durations.get(i)}
										</div>
									</div>
									<div class="col-2">
										<g:if test="${project.verified == 'execute'}">
											<div class="text">执行中</div>
										</g:if>
										<g:elseif test="${project.verified == 'draft'}">
											<div class="text">草稿</div>
										</g:elseif>
										<g:elseif test="${project.verified == 'wait'}">
											<div class="text">审核中</div>
										</g:elseif>
										<g:elseif test="${project.verified == 'refuse'}">
											<div class="text">不通过</div>
										</g:elseif>
										<g:elseif test="${project.verified == 'modify'}">
											<div class="text">退回修改</div>
										</g:elseif>
										<g:elseif test="${project.verified == 'pass'}">
											<div class="text">筹款中</div>
										</g:elseif>
										<g:elseif test="${project.verified == 'expired'}">
											<div class="text">已过期</div>
										</g:elseif>
										<g:elseif test="${project.verified == 'over'}">
											<div class="text">已结束</div>
										</g:elseif>
									</div>
									<div class="col-1">
										<div class="text">
											${project.donateNum}
										</div>
									</div>
									<div class="col-2">
										<div class="text">
											<g:formatNumber number="${project.amount}" format="###.##" />元
										</div>
									</div>
									<div class="col-2">
										<div class="text">
											<g:if test="${(project.amount-project.rest)==0}">0元</g:if>
											<g:else>
											<g:formatNumber number="${project.amount-project.rest}"
												format="###.##" minFractionDigits="2"/>元
											</g:else>
										</div>
									</div>
									<div class="col-2">
										<div class="text"></div>
									</div>
									<div class="col-2">
										<div class="text">
											<g:if test="${fRulers.get(i)!=null }">
												${fRulers.get(i).fundPool.name}
											</g:if>
										</div>
									</div>
									<div class="col-2">
										<div class="text">
											<g:if test="${fRulers.get(i)!=null }">
												${fRulers.get(i).donatefund}
											</g:if>
										</div>
									</div>
									<div class="clearboth"></div>
								</li>
							</g:each>
						</ul>
					</div>

					<div class="pagea">
						<span>共${totalCount ?: 0}条记录
						</span>
						<div class="page float_r">
							<g:paginate controller="manage" action="listProjectFeeDetail"
								total="${totalCount ?: 0}" params="${params}" />
						</div>
					</div>
				</div>
			</div>
			<div class="clearboth"></div>
		</section>


	</div>

	<!-- 删除弹出框 -->


	<script type="text/javascript">
		$(function() {
			$(
					'.meterial-lib-box .content-box .form-box .img-box input[type=file]')
					.change(
							function() {
								$(this)
										.siblings('.img-default')
										.hide()
										.parent()
										.css('background-image',
												'url(' + getFileURL(this) + ')');
							});
		});
	</script>

	<script type="text/javascript">
		$(function() {
			$(
					'.meterial-lib-box .content-box .form-box .img-box input[type=file]')
					.change(
							function() {
								$(this)
										.siblings('.img-default')
										.hide()
										.parent()
										.css('background-image',
												'url(' + getFileURL(this) + ')');
							});

		});
	</script>

</body>
</html>